<!-- HTML header for doxygen 1.8.13-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="icon" type="image/x-icon" href="favicon.ico" />
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>chigraph: chi::Result Struct Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="chigraphDoxygenIcon.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">chigraph
   &#160;<span id="projectnumber">master</span>
   </div>
   <div id="projectbrief">Systems programming language written for beginners in LLVM</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('structchi_1_1Result.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="structchi_1_1Result-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">chi::Result Struct Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>The result object, used for identifiying errors with good diagnostics.  
 <a href="structchi_1_1Result.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="Result_8hpp_source.html">chi/Support/Result.hpp</a>&gt;</code></p>
<div id="dynsection-0" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-0-trigger" src="closed.png" alt="+"/> Collaboration diagram for chi::Result:</div>
<div id="dynsection-0-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-0-content" class="dyncontent" style="display:none;">
<div class="center"><iframe scrolling="no" frameborder="0" src="structchi_1_1Result__coll__graph.svg" width="178" height="127"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structchi_1_1Result_1_1ScopedContext.html">ScopedContext</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">A helper object for contexts that should be removed at the end of a scope.  <a href="structchi_1_1Result_1_1ScopedContext.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:aad77832631e03436010ecff5bb7ff597"><td class="memItemLeft" align="right" valign="top"><a id="aad77832631e03436010ecff5bb7ff597"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structchi_1_1Result.html#aad77832631e03436010ecff5bb7ff597">Result</a> ()</td></tr>
<tr class="memdesc:aad77832631e03436010ecff5bb7ff597"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default constructor; defaults to success. <br /></td></tr>
<tr class="separator:aad77832631e03436010ecff5bb7ff597"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5cbde12f0c21347635469c7acf8d4112"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structchi_1_1Result.html#a5cbde12f0c21347635469c7acf8d4112">addContext</a> (const nlohmann::json &amp;data)</td></tr>
<tr class="memdesc:a5cbde12f0c21347635469c7acf8d4112"><td class="mdescLeft">&#160;</td><td class="mdescRight">Add some json that will ALWAYS be merged with entries that are added and when results are added to this <a class="el" href="structchi_1_1Result.html" title="The result object, used for identifiying errors with good diagnostics. ">Result</a>.  <a href="#a5cbde12f0c21347635469c7acf8d4112">More...</a><br /></td></tr>
<tr class="separator:a5cbde12f0c21347635469c7acf8d4112"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a59ef40f4a327cbdea263d6e4b5af2ad8"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structchi_1_1Result.html#a59ef40f4a327cbdea263d6e4b5af2ad8">addEntry</a> (const char *ec, const char *overview, nlohmann::json data)</td></tr>
<tr class="memdesc:a59ef40f4a327cbdea263d6e4b5af2ad8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Add a entry to the result, either a warning or an error.  <a href="#a59ef40f4a327cbdea263d6e4b5af2ad8">More...</a><br /></td></tr>
<tr class="separator:a59ef40f4a327cbdea263d6e4b5af2ad8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5cd21feaa68ac0d813b3eec7d3ea34c6"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structchi_1_1Result_1_1ScopedContext.html">ScopedContext</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structchi_1_1Result.html#a5cd21feaa68ac0d813b3eec7d3ea34c6">addScopedContext</a> (const nlohmann::json &amp;data)</td></tr>
<tr class="memdesc:a5cd21feaa68ac0d813b3eec7d3ea34c6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Add a context with a scope Example usage: </p><div class="fragment"><div class="line"><a class="code" href="structchi_1_1Result.html">chi::Result</a> res;</div><div class="line">res.<a class="code" href="structchi_1_1Result.html#aa078d3cb3dfb2fb63e81b71acea036e0">contextJson</a>(); <span class="comment">// returns {}</span></div><div class="line">{</div><div class="line">    <span class="keyword">auto</span> scopedCtx = res.<a class="code" href="structchi_1_1Result.html#a5cd21feaa68ac0d813b3eec7d3ea34c6">addScopedContext</a>({{<span class="stringliteral">&quot;Module&quot;</span>, <span class="stringliteral">&quot;lang&quot;</span>}});</div><div class="line">    res.<a class="code" href="structchi_1_1Result.html#aa078d3cb3dfb2fb63e81b71acea036e0">contextJson</a>(); <span class="comment">// returns {&quot;module&quot;: &quot;lang&quot;}</span></div><div class="line">}</div><div class="line">res.<a class="code" href="structchi_1_1Result.html#aa078d3cb3dfb2fb63e81b71acea036e0">contextJson</a>(); <span class="comment">// returns {}</span></div></div><!-- fragment --><p>.  <a href="#a5cd21feaa68ac0d813b3eec7d3ea34c6">More...</a><br /></td></tr>
<tr class="separator:a5cd21feaa68ac0d813b3eec7d3ea34c6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa078d3cb3dfb2fb63e81b71acea036e0"><td class="memItemLeft" align="right" valign="top">nlohmann::json&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structchi_1_1Result.html#aa078d3cb3dfb2fb63e81b71acea036e0">contextJson</a> () const</td></tr>
<tr class="memdesc:aa078d3cb3dfb2fb63e81b71acea036e0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the JSON associated with the context that's been added.  <a href="#aa078d3cb3dfb2fb63e81b71acea036e0">More...</a><br /></td></tr>
<tr class="separator:aa078d3cb3dfb2fb63e81b71acea036e0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2e208b26f30dc292c5ab72354757b6dd"><td class="memItemLeft" align="right" valign="top">std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structchi_1_1Result.html#a2e208b26f30dc292c5ab72354757b6dd">dump</a> () const</td></tr>
<tr class="memdesc:a2e208b26f30dc292c5ab72354757b6dd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Dump to a pretty-printed error message.  <a href="#a2e208b26f30dc292c5ab72354757b6dd">More...</a><br /></td></tr>
<tr class="separator:a2e208b26f30dc292c5ab72354757b6dd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a26406ce67145a4e7893018ccbf50dc89"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structchi_1_1Result.html#a26406ce67145a4e7893018ccbf50dc89">operator bool</a> () const</td></tr>
<tr class="memdesc:a26406ce67145a4e7893018ccbf50dc89"><td class="mdescLeft">&#160;</td><td class="mdescRight">Success test.  <a href="#a26406ce67145a4e7893018ccbf50dc89">More...</a><br /></td></tr>
<tr class="separator:a26406ce67145a4e7893018ccbf50dc89"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac4c9a2e6f79dbd1f49116370cfc96513"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structchi_1_1Result.html#ac4c9a2e6f79dbd1f49116370cfc96513">operator!</a> () const</td></tr>
<tr class="memdesc:ac4c9a2e6f79dbd1f49116370cfc96513"><td class="mdescLeft">&#160;</td><td class="mdescRight">!Success test  <a href="#ac4c9a2e6f79dbd1f49116370cfc96513">More...</a><br /></td></tr>
<tr class="separator:ac4c9a2e6f79dbd1f49116370cfc96513"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab801a9230e3e46dc771f260992e4e84d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structchi_1_1Result.html#ab801a9230e3e46dc771f260992e4e84d">removeContext</a> (int id)</td></tr>
<tr class="memdesc:ab801a9230e3e46dc771f260992e4e84d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Removes a previously added context.  <a href="#ab801a9230e3e46dc771f260992e4e84d">More...</a><br /></td></tr>
<tr class="separator:ab801a9230e3e46dc771f260992e4e84d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a98065cddbdc75d3130b5d8c3d567f507"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structchi_1_1Result.html#a98065cddbdc75d3130b5d8c3d567f507">success</a> () const</td></tr>
<tr class="memdesc:a98065cddbdc75d3130b5d8c3d567f507"><td class="mdescLeft">&#160;</td><td class="mdescRight">Success test.  <a href="#a98065cddbdc75d3130b5d8c3d567f507">More...</a><br /></td></tr>
<tr class="separator:a98065cddbdc75d3130b5d8c3d567f507"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:af020ebd48f50571295922b6235cf26bf"><td class="memItemLeft" align="right" valign="top"><a id="af020ebd48f50571295922b6235cf26bf"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structchi_1_1Result.html#af020ebd48f50571295922b6235cf26bf">mSuccess</a> = true</td></tr>
<tr class="memdesc:af020ebd48f50571295922b6235cf26bf"><td class="mdescLeft">&#160;</td><td class="mdescRight">If it's successful. <br /></td></tr>
<tr class="separator:af020ebd48f50571295922b6235cf26bf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a22548cdff3037498a9cd978383458812"><td class="memItemLeft" align="right" valign="top"><a id="a22548cdff3037498a9cd978383458812"></a>
nlohmann::json&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structchi_1_1Result.html#a22548cdff3037498a9cd978383458812">result_json</a></td></tr>
<tr class="memdesc:a22548cdff3037498a9cd978383458812"><td class="mdescLeft">&#160;</td><td class="mdescRight">The result JSON. <br /></td></tr>
<tr class="separator:a22548cdff3037498a9cd978383458812"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="related"></a>
Related Functions</h2></td></tr>
<tr><td class="ititle" colspan="2"><p>(Note that these are not member functions.) </p>
</td></tr>
<tr><td colspan="2"><div class="groupHeader">Result operators</div></td></tr>
<tr class="memitem:a8fb4cc68d78f0a0068c0ddd282875eee"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structchi_1_1Result.html">Result</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structchi_1_1Result.html#a8fb4cc68d78f0a0068c0ddd282875eee">operator+</a> (const <a class="el" href="structchi_1_1Result.html">Result</a> &amp;lhs, const <a class="el" href="structchi_1_1Result.html">Result</a> &amp;rhs)</td></tr>
<tr class="memdesc:a8fb4cc68d78f0a0068c0ddd282875eee"><td class="mdescLeft">&#160;</td><td class="mdescRight">Append two <a class="el" href="structchi_1_1Result.html" title="The result object, used for identifiying errors with good diagnostics. ">Result</a> objects.  <a href="#a8fb4cc68d78f0a0068c0ddd282875eee">More...</a><br /></td></tr>
<tr class="separator:a8fb4cc68d78f0a0068c0ddd282875eee"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa3dbb473ec8607456c13be950e739827"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structchi_1_1Result.html">Result</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structchi_1_1Result.html#aa3dbb473ec8607456c13be950e739827">operator+=</a> (<a class="el" href="structchi_1_1Result.html">Result</a> &amp;lhs, const <a class="el" href="structchi_1_1Result.html">Result</a> &amp;rhs)</td></tr>
<tr class="memdesc:aa3dbb473ec8607456c13be950e739827"><td class="mdescLeft">&#160;</td><td class="mdescRight">Append one result to an existing one.  <a href="#aa3dbb473ec8607456c13be950e739827">More...</a><br /></td></tr>
<tr class="separator:aa3dbb473ec8607456c13be950e739827"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3a1caa60d79ed3cd997da1559bddd278"><td class="memItemLeft" align="right" valign="top">std::ostream &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structchi_1_1Result.html#a3a1caa60d79ed3cd997da1559bddd278">operator&lt;&lt;</a> (std::ostream &amp;lhs, const <a class="el" href="structchi_1_1Result.html">Result</a> &amp;rhs)</td></tr>
<tr class="memdesc:a3a1caa60d79ed3cd997da1559bddd278"><td class="mdescLeft">&#160;</td><td class="mdescRight">Stream operator.  <a href="#a3a1caa60d79ed3cd997da1559bddd278">More...</a><br /></td></tr>
<tr class="separator:a3a1caa60d79ed3cd997da1559bddd278"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>The result object, used for identifiying errors with good diagnostics. </p>
<h2>Usage:</h2>
<p>If you want to construct a default result object, just call the default constructor: </p><div class="fragment"></div><!-- fragment --><p> <code>res</code> is the most common name for an error object, prefer it to other names.</p>
<p>When constructed, results are successful by default: </p><div class="fragment"><div class="line">    assert(res.<a class="code" href="structchi_1_1Result.html#a98065cddbdc75d3130b5d8c3d567f507">success</a>());</div></div><!-- fragment --><p> When an error, warning, or just some event that requries logging needs to be added to the result object, call <code><a class="el" href="structchi_1_1Result.html#a59ef40f4a327cbdea263d6e4b5af2ad8" title="Add a entry to the result, either a warning or an error. ">Result::addEntry</a></code>: </p><div class="fragment"><div class="line">    res.<a class="code" href="structchi_1_1Result.html#a59ef40f4a327cbdea263d6e4b5af2ad8">addEntry</a>(<span class="stringliteral">&quot;W123&quot;</span>, <span class="stringliteral">&quot;Just a warning, don&#39;t fret.&quot;</span>, {{<span class="stringliteral">&quot;Probably here&quot;</span>, 21}});</div></div><!-- fragment --><p> note the <code>W</code> at the beginning of the error code, this is important. If it's an <code>W</code>, it's considered an warning and the result will still be considered successful: </p><div class="fragment"><div class="line">    assert(res.<a class="code" href="structchi_1_1Result.html#a98065cddbdc75d3130b5d8c3d567f507">success</a>());</div></div><!-- fragment --><p> If that leading character to the error code is an 'E', then it's considered an error </p><div class="fragment"><div class="line">    res.<a class="code" href="structchi_1_1Result.html#a59ef40f4a327cbdea263d6e4b5af2ad8">addEntry</a>(<span class="stringliteral">&quot;E231&quot;</span>, <span class="stringliteral">&quot;Some error occured&quot;</span>, {{<span class="stringliteral">&quot;Line Number&quot;</span>, 34}});</div></div><!-- fragment --><p> And the result is not successful anymore: </p><div class="fragment"><div class="line">    assert(!res.<a class="code" href="structchi_1_1Result.html#a98065cddbdc75d3130b5d8c3d567f507">success</a>());</div></div><!-- fragment --><p> If you're calling another operation that emits a <a class="el" href="structchi_1_1Result.html" title="The result object, used for identifiying errors with good diagnostics. ">Result</a> object, then there's an easy to integrate that result object: the opeartor+= </p><div class="fragment"><div class="line">    res += thisWillFail();</div></div><!-- fragment --> <h2>Standardized names in data:</h2>
<p>In order to have good parsing of errors, some standards are good. If you are trying to represent this data in your error, use these standards so it can be parsed later on and presented to the user in a nice way</p>
<table class="doxtable">
<tr>
<th>Name in JSON </th><th>Description  </th></tr>
<tr>
<td><code>Node ID</code> </td><td>The ID of the node that errored </td></tr>
</table>
<h1>What is EUKN?</h1>
<p>Not every error in chigraph is documented and tested. Errors with numbers are tested and possibly documented. EUKN errors are just undocumented errors.</p>
<h2>Implementation Details:</h2>
<p><a class="el" href="structchi_1_1Result.html" title="The result object, used for identifiying errors with good diagnostics. ">Result</a> objects store a json object that represents the error metadata. It's an array, each being an object containing three objects:</p><ul>
<li><p class="startli"><code>errorcode</code>: The errorcode. This is an identifier representng the error: a character followed by a number. The value of the character changes the behaviour:</p><ul>
<li><code>E</code>: it's an error and sets <code>success</code> to false.</li>
<li><code>W</code>: it's a warning</li>
<li><code>I</code>: it's just info</li>
</ul>
<p class="startli">If it's anything else, that it will cause an assertion</p>
</li>
<li><code>overview</code>: A simple string representing the generics of the problem. It <em>shouldn't</em> differ from error to error, if you need to include specifics use the <code>data</code> element</li>
<li><code>data</code>: Extra metadata for the error, including context and how the error occured. </li>
</ul>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="ResultExample_8cpp-example.html#_a0">ResultExample.cpp</a>, and <a class="el" href="SubprocessExample_8cpp-example.html#_a2">SubprocessExample.cpp</a>.</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="Result_8hpp_source.html#l00072">72</a> of file <a class="el" href="Result_8hpp_source.html">Result.hpp</a>.</p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="a5cbde12f0c21347635469c7acf8d4112"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5cbde12f0c21347635469c7acf8d4112">&#9670;&nbsp;</a></span>addContext()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int chi::Result::addContext </td>
          <td>(</td>
          <td class="paramtype">const nlohmann::json &amp;&#160;</td>
          <td class="paramname"><em>data</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Add some json that will ALWAYS be merged with entries that are added and when results are added to this <a class="el" href="structchi_1_1Result.html" title="The result object, used for identifiying errors with good diagnostics. ">Result</a>. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">data</td><td>The json to merge with every entry </td></tr>
  </table>
  </dd>
</dl>
<dl class="section pre"><dt>Precondition</dt><dd>data.is_object() </dd></dl>
<dl class="section return"><dt>Returns</dt><dd>The ID for this context, use this value with removeContext to remove it </dd></dl>

<p class="definition">Definition at line <a class="el" href="Result_8cpp_source.html#l00084">84</a> of file <a class="el" href="Result_8cpp_source.html">Result.cpp</a>.</p>

<p class="reference">Referenced by <a class="el" href="Result_8hpp_source.html#l00123">addScopedContext()</a>, and <a class="el" href="Result_8hpp_source.html#l00091">Result()</a>.</p>
<div id="dynsection-1" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-1-trigger" src="closed.png" alt="+"/> Here is the caller graph for this function:</div>
<div id="dynsection-1-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-1-content" class="dyncontent" style="display:none;">
<div class="center"><div class="zoom"><iframe scrolling="no" frameborder="0" src="structchi_1_1Result_a5cbde12f0c21347635469c7acf8d4112_icgraph.svg" width="100%" height="600"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
</div>
</div>

</div>
</div>
<a id="a59ef40f4a327cbdea263d6e4b5af2ad8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a59ef40f4a327cbdea263d6e4b5af2ad8">&#9670;&nbsp;</a></span>addEntry()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void chi::Result::addEntry </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>ec</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>overview</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">nlohmann::json&#160;</td>
          <td class="paramname"><em>data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Add a entry to the result, either a warning or an error. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">ec</td><td>The error/warning code. If it starts with E, then it is an error and success is set to false, if it starts with a W it's a warning and success can stay true if it is still true. </td></tr>
    <tr><td class="paramname">overview</td><td>Basic overview of the error, this shouldn't change based on the instance of the error </td></tr>
    <tr><td class="paramname">data</td><td>The detailed description this instance of the error. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section pre"><dt>Precondition</dt><dd><code>data.is_object() == true</code> </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="ResultExample_8cpp-example.html#a1">ResultExample.cpp</a>.</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="Result_8cpp_source.html#l00052">52</a> of file <a class="el" href="Result_8cpp_source.html">Result.cpp</a>.</p>

<p class="reference">References <a class="el" href="Result_8cpp_source.html#l00095">contextJson()</a>, <a class="el" href="Result_8hpp_source.html#l00155">mSuccess</a>, and <a class="el" href="Result_8hpp_source.html#l00152">result_json</a>.</p>

<p class="reference">Referenced by <a class="el" href="Subprocess_8cpp_source.html#l00388">chi::Subprocess::closeStdIn()</a>, <a class="el" href="CCompiler_8cpp_source.html#l00017">chi::compileCToLLVM()</a>, <a class="el" href="Context_8cpp_source.html#l00284">chi::Context::compileModule()</a>, <a class="el" href="NodeInstance_8cpp_source.html#l00128">chi::connectData()</a>, <a class="el" href="NodeInstance_8cpp_source.html#l00186">chi::connectExec()</a>, <a class="el" href="JsonDeserializer_8cpp_source.html#l00121">chi::createGraphFunctionDeclarationFromJson()</a>, <a class="el" href="GraphModule_8cpp_source.html#l00866">chi::GraphModule::createNodeTypeFromCCode()</a>, <a class="el" href="NodeInstance_8cpp_source.html#l00229">chi::disconnectData()</a>, <a class="el" href="NodeInstance_8cpp_source.html#l00294">chi::disconnectExec()</a>, <a class="el" href="FunctionCompiler_8cpp_source.html#l00035">chi::FunctionCompiler::initialize()</a>, <a class="el" href="GraphFunction_8cpp_source.html#l00064">chi::GraphFunction::insertNode()</a>, <a class="el" href="Context_8cpp_source.html#l00528">chi::interpretLLVMIR()</a>, <a class="el" href="Context_8cpp_source.html#l00564">chi::interpretLLVMIRAsMain()</a>, <a class="el" href="JsonDeserializer_8cpp_source.html#l00232">chi::jsonToGraphFunction()</a>, <a class="el" href="JsonDeserializer_8cpp_source.html#l00014">chi::jsonToGraphModule()</a>, <a class="el" href="JsonDeserializer_8cpp_source.html#l00450">chi::jsonToGraphStruct()</a>, <a class="el" href="Context_8cpp_source.html#l00253">chi::Context::nodeTypeFromModule()</a>, <a class="el" href="LangModule_8cpp_source.html#l00847">chi::LangModule::nodeTypeFromName()</a>, <a class="el" href="GraphModule_8cpp_source.html#l00606">chi::GraphModule::nodeTypeFromName()</a>, <a class="el" href="BitcodeParser_8cpp_source.html#l00056">chi::parseBitcodeFile()</a>, <a class="el" href="Debugger_8cpp_source.html#l00093">chi::Debugger::pause()</a>, <a class="el" href="Debugger_8cpp_source.html#l00077">chi::Debugger::processContinue()</a>, <a class="el" href="Subprocess_8cpp_source.html#l00374">chi::Subprocess::pushToStdIn()</a>, <a class="el" href="Result_8hpp_source.html#l00091">Result()</a>, <a class="el" href="GraphModule_8cpp_source.html#l00514">chi::GraphModule::saveToDisk()</a>, <a class="el" href="Debugger_8cpp_source.html#l00110">chi::Debugger::setBreakpoint()</a>, <a class="el" href="Debugger_8cpp_source.html#l00145">chi::Debugger::start()</a>, <a class="el" href="Subprocess_8cpp_source.html#l00405">chi::Subprocess::start()</a>, <a class="el" href="Debugger_8cpp_source.html#l00060">chi::Debugger::terminate()</a>, <a class="el" href="Context_8cpp_source.html#l00232">chi::Context::typeFromModule()</a>, <a class="el" href="FunctionValidator_8cpp_source.html#l00031">chi::validateFunctionConnectionsAreTwoWay()</a>, <a class="el" href="FunctionValidator_8cpp_source.html#l00249">chi::validateFunctionEntryType()</a>, <a class="el" href="FunctionValidator_8cpp_source.html#l00222">chi::validateFunctionExecOutputs()</a>, <a class="el" href="FunctionValidator_8cpp_source.html#l00281">chi::validateFunctionExitTypes()</a>, and <a class="el" href="FunctionValidator_8cpp_source.html#l00310">chi::validateFunctionMainSignature()</a>.</p>
<div id="dynsection-2" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-2-trigger" src="closed.png" alt="+"/> Here is the call graph for this function:</div>
<div id="dynsection-2-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-2-content" class="dyncontent" style="display:none;">
<div class="center"><iframe scrolling="no" frameborder="0" src="structchi_1_1Result_a59ef40f4a327cbdea263d6e4b5af2ad8_cgraph.svg" width="366" height="38"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
</div>
<div id="dynsection-3" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-3-trigger" src="closed.png" alt="+"/> Here is the caller graph for this function:</div>
<div id="dynsection-3-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-3-content" class="dyncontent" style="display:none;">
<div class="center"><div class="zoom"><iframe scrolling="no" frameborder="0" src="structchi_1_1Result_a59ef40f4a327cbdea263d6e4b5af2ad8_icgraph.svg" width="100%" height="600"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
</div>
</div>

</div>
</div>
<a id="a5cd21feaa68ac0d813b3eec7d3ea34c6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5cd21feaa68ac0d813b3eec7d3ea34c6">&#9670;&nbsp;</a></span>addScopedContext()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structchi_1_1Result_1_1ScopedContext.html">ScopedContext</a> chi::Result::addScopedContext </td>
          <td>(</td>
          <td class="paramtype">const nlohmann::json &amp;&#160;</td>
          <td class="paramname"><em>data</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Add a context with a scope Example usage: </p><div class="fragment"><div class="line"><a class="code" href="structchi_1_1Result.html">chi::Result</a> res;</div><div class="line">res.<a class="code" href="structchi_1_1Result.html#aa078d3cb3dfb2fb63e81b71acea036e0">contextJson</a>(); <span class="comment">// returns {}</span></div><div class="line">{</div><div class="line">    <span class="keyword">auto</span> scopedCtx = res.<a class="code" href="structchi_1_1Result.html#a5cd21feaa68ac0d813b3eec7d3ea34c6">addScopedContext</a>({{<span class="stringliteral">&quot;Module&quot;</span>, <span class="stringliteral">&quot;lang&quot;</span>}});</div><div class="line">    res.<a class="code" href="structchi_1_1Result.html#aa078d3cb3dfb2fb63e81b71acea036e0">contextJson</a>(); <span class="comment">// returns {&quot;module&quot;: &quot;lang&quot;}</span></div><div class="line">}</div><div class="line">res.<a class="code" href="structchi_1_1Result.html#aa078d3cb3dfb2fb63e81b71acea036e0">contextJson</a>(); <span class="comment">// returns {}</span></div></div><!-- fragment --><p>. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">data</td><td>The data to add to each entry </td></tr>
  </table>
  </dd>
</dl>
<dl class="section pre"><dt>Precondition</dt><dd>data.is_object() </dd></dl>
<dl class="section return"><dt>Returns</dt><dd>The <a class="el" href="structchi_1_1Result_1_1ScopedContext.html" title="A helper object for contexts that should be removed at the end of a scope. ">ScopedContext</a> object. Shouldn't be discarded. </dd></dl>

<p class="definition">Definition at line <a class="el" href="Result_8hpp_source.html#l00123">123</a> of file <a class="el" href="Result_8hpp_source.html">Result.hpp</a>.</p>

<p class="reference">References <a class="el" href="Result_8cpp_source.html#l00084">addContext()</a>, <a class="el" href="Result_8cpp_source.html#l00095">contextJson()</a>, and <a class="el" href="Result_8cpp_source.html#l00093">removeContext()</a>.</p>

<p class="reference">Referenced by <a class="el" href="Context_8cpp_source.html#l00156">chi::Context::addModuleFromJson()</a>, <a class="el" href="CCompiler_8cpp_source.html#l00017">chi::compileCToLLVM()</a>, <a class="el" href="Context_8cpp_source.html#l00298">chi::Context::compileModule()</a>, <a class="el" href="FunctionCompiler_8cpp_source.html#l00035">chi::FunctionCompiler::initialize()</a>, <a class="el" href="JsonDeserializer_8cpp_source.html#l00014">chi::jsonToGraphModule()</a>, <a class="el" href="Context_8cpp_source.html#l00091">chi::Context::loadModule()</a>, <a class="el" href="FunctionValidator_8cpp_source.html#l00031">chi::validateFunctionConnectionsAreTwoWay()</a>, <a class="el" href="FunctionValidator_8cpp_source.html#l00222">chi::validateFunctionExecOutputs()</a>, and <a class="el" href="FunctionValidator_8cpp_source.html#l00198">chi::validateFunctionNodeInputs()</a>.</p>
<div id="dynsection-4" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-4-trigger" src="closed.png" alt="+"/> Here is the call graph for this function:</div>
<div id="dynsection-4-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-4-content" class="dyncontent" style="display:none;">
<div class="center"><iframe scrolling="no" frameborder="0" src="structchi_1_1Result_a5cd21feaa68ac0d813b3eec7d3ea34c6_cgraph.svg" width="442" height="139"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
</div>
<div id="dynsection-5" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-5-trigger" src="closed.png" alt="+"/> Here is the caller graph for this function:</div>
<div id="dynsection-5-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-5-content" class="dyncontent" style="display:none;">
<div class="center"><div class="zoom"><iframe scrolling="no" frameborder="0" src="structchi_1_1Result_a5cd21feaa68ac0d813b3eec7d3ea34c6_icgraph.svg" width="100%" height="600"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
</div>
</div>

</div>
</div>
<a id="aa078d3cb3dfb2fb63e81b71acea036e0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa078d3cb3dfb2fb63e81b71acea036e0">&#9670;&nbsp;</a></span>contextJson()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">nlohmann::json chi::Result::contextJson </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the JSON associated with the context that's been added. </p>
<dl class="section return"><dt>Returns</dt><dd>The context JSON </dd></dl>

<p class="definition">Definition at line <a class="el" href="Result_8cpp_source.html#l00095">95</a> of file <a class="el" href="Result_8cpp_source.html">Result.cpp</a>.</p>

<p class="reference">Referenced by <a class="el" href="Result_8cpp_source.html#l00052">addEntry()</a>, <a class="el" href="Result_8hpp_source.html#l00123">addScopedContext()</a>, <a class="el" href="Result_8cpp_source.html#l00106">operator+()</a>, and <a class="el" href="Result_8cpp_source.html#l00127">operator+=()</a>.</p>
<div id="dynsection-6" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-6-trigger" src="closed.png" alt="+"/> Here is the caller graph for this function:</div>
<div id="dynsection-6-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-6-content" class="dyncontent" style="display:none;">
<div class="center"><div class="zoom"><iframe scrolling="no" frameborder="0" src="structchi_1_1Result_aa078d3cb3dfb2fb63e81b71acea036e0_icgraph.svg" width="100%" height="600"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
</div>
</div>

</div>
</div>
<a id="a2e208b26f30dc292c5ab72354757b6dd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2e208b26f30dc292c5ab72354757b6dd">&#9670;&nbsp;</a></span>dump()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::string chi::Result::dump </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Dump to a pretty-printed error message. </p>
<dl class="section return"><dt>Returns</dt><dd>The human-readable error message </dd></dl>

<p class="definition">Definition at line <a class="el" href="Result_8cpp_source.html#l00065">65</a> of file <a class="el" href="Result_8cpp_source.html">Result.cpp</a>.</p>

<p class="reference">References <a class="el" href="Result_8hpp_source.html#l00152">result_json</a>.</p>

<p class="reference">Referenced by <a class="el" href="Result_8hpp_source.html#l00145">operator!()</a>, and <a class="el" href="Result_8hpp_source.html#l00187">operator&lt;&lt;()</a>.</p>
<div id="dynsection-7" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-7-trigger" src="closed.png" alt="+"/> Here is the caller graph for this function:</div>
<div id="dynsection-7-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-7-content" class="dyncontent" style="display:none;">
<div class="center"><iframe scrolling="no" frameborder="0" src="structchi_1_1Result_a2e208b26f30dc292c5ab72354757b6dd_icgraph.svg" width="338" height="88"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
</div>

</div>
</div>
<a id="a26406ce67145a4e7893018ccbf50dc89"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a26406ce67145a4e7893018ccbf50dc89">&#9670;&nbsp;</a></span>operator bool()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">chi::Result::operator bool </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">explicit</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Success test. </p>
<dl class="section return"><dt>Returns</dt><dd>True if successful </dd></dl>

<p class="definition">Definition at line <a class="el" href="Result_8hpp_source.html#l00137">137</a> of file <a class="el" href="Result_8hpp_source.html">Result.hpp</a>.</p>

<p class="reference">References <a class="el" href="Result_8hpp_source.html#l00141">success()</a>.</p>
<div id="dynsection-8" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-8-trigger" src="closed.png" alt="+"/> Here is the call graph for this function:</div>
<div id="dynsection-8-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-8-content" class="dyncontent" style="display:none;">
<div class="center"><iframe scrolling="no" frameborder="0" src="structchi_1_1Result_a26406ce67145a4e7893018ccbf50dc89_cgraph.svg" width="367" height="38"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
</div>

</div>
</div>
<a id="ac4c9a2e6f79dbd1f49116370cfc96513"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac4c9a2e6f79dbd1f49116370cfc96513">&#9670;&nbsp;</a></span>operator!()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool chi::Result::operator! </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>!Success test </p>
<dl class="section return"><dt>Returns</dt><dd>If it's not successful </dd></dl>

<p class="definition">Definition at line <a class="el" href="Result_8hpp_source.html#l00145">145</a> of file <a class="el" href="Result_8hpp_source.html">Result.hpp</a>.</p>

<p class="reference">References <a class="el" href="Result_8cpp_source.html#l00065">dump()</a>, and <a class="el" href="Result_8hpp_source.html#l00141">success()</a>.</p>
<div id="dynsection-9" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-9-trigger" src="closed.png" alt="+"/> Here is the call graph for this function:</div>
<div id="dynsection-9-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-9-content" class="dyncontent" style="display:none;">
<div class="center"><iframe scrolling="no" frameborder="0" src="structchi_1_1Result_ac4c9a2e6f79dbd1f49116370cfc96513_cgraph.svg" width="343" height="88"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
</div>

</div>
</div>
<a id="ab801a9230e3e46dc771f260992e4e84d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab801a9230e3e46dc771f260992e4e84d">&#9670;&nbsp;</a></span>removeContext()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void chi::Result::removeContext </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>id</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Removes a previously added context. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">id</td><td>The ID for the context added with addContext </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="Result_8cpp_source.html#l00093">93</a> of file <a class="el" href="Result_8cpp_source.html">Result.cpp</a>.</p>

<p class="reference">Referenced by <a class="el" href="Result_8hpp_source.html#l00123">addScopedContext()</a>, and <a class="el" href="Result_8hpp_source.html#l00081">chi::Result::ScopedContext::~ScopedContext()</a>.</p>
<div id="dynsection-10" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-10-trigger" src="closed.png" alt="+"/> Here is the caller graph for this function:</div>
<div id="dynsection-10-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-10-content" class="dyncontent" style="display:none;">
<div class="center"><div class="zoom"><iframe scrolling="no" frameborder="0" src="structchi_1_1Result_ab801a9230e3e46dc771f260992e4e84d_icgraph.svg" width="100%" height="600"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
</div>
</div>

</div>
</div>
<a id="a98065cddbdc75d3130b5d8c3d567f507"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a98065cddbdc75d3130b5d8c3d567f507">&#9670;&nbsp;</a></span>success()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool chi::Result::success </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Success test. </p>
<dl class="section return"><dt>Returns</dt><dd>If it's successful </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="ResultExample_8cpp-example.html#a2">ResultExample.cpp</a>.</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="Result_8hpp_source.html#l00141">141</a> of file <a class="el" href="Result_8hpp_source.html">Result.hpp</a>.</p>

<p class="reference">References <a class="el" href="Result_8hpp_source.html#l00155">mSuccess</a>.</p>

<p class="reference">Referenced by <a class="el" href="Result_8hpp_source.html#l00137">operator bool()</a>, <a class="el" href="Result_8hpp_source.html#l00145">operator!()</a>, <a class="el" href="Result_8cpp_source.html#l00106">operator+()</a>, and <a class="el" href="Result_8cpp_source.html#l00127">operator+=()</a>.</p>
<div id="dynsection-11" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-11-trigger" src="closed.png" alt="+"/> Here is the caller graph for this function:</div>
<div id="dynsection-11-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-11-content" class="dyncontent" style="display:none;">
<div class="center"><iframe scrolling="no" frameborder="0" src="structchi_1_1Result_a98065cddbdc75d3130b5d8c3d567f507_icgraph.svg" width="367" height="190"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
</div>

</div>
</div>
<h2 class="groupheader">Friends And Related Function Documentation</h2>
<a id="a8fb4cc68d78f0a0068c0ddd282875eee"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8fb4cc68d78f0a0068c0ddd282875eee">&#9670;&nbsp;</a></span>operator+()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structchi_1_1Result.html">Result</a> operator+ </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structchi_1_1Result.html">Result</a> &amp;&#160;</td>
          <td class="paramname"><em>lhs</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structchi_1_1Result.html">Result</a> &amp;&#160;</td>
          <td class="paramname"><em>rhs</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">related</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Append two <a class="el" href="structchi_1_1Result.html" title="The result object, used for identifiying errors with good diagnostics. ">Result</a> objects. </p>
<p>Both of the contexts are merged. The entires in lhs have the rhs context applied to them, and viceversa as well </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">lhs</td><td>The left <a class="el" href="structchi_1_1Result.html" title="The result object, used for identifiying errors with good diagnostics. ">Result</a> </td></tr>
    <tr><td class="paramname">rhs</td><td>The right <a class="el" href="structchi_1_1Result.html" title="The result object, used for identifiying errors with good diagnostics. ">Result</a> </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The concatinated <a class="el" href="structchi_1_1Result.html" title="The result object, used for identifiying errors with good diagnostics. ">Result</a> </dd></dl>

<p class="definition">Definition at line <a class="el" href="Result_8cpp_source.html#l00106">106</a> of file <a class="el" href="Result_8cpp_source.html">Result.cpp</a>.</p>

<p class="reference">References <a class="el" href="Result_8cpp_source.html#l00095">contextJson()</a>, <a class="el" href="Result_8hpp_source.html#l00155">mSuccess</a>, <a class="el" href="Result_8hpp_source.html#l00152">result_json</a>, and <a class="el" href="Result_8hpp_source.html#l00141">success()</a>.</p>
<div id="dynsection-12" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-12-trigger" src="closed.png" alt="+"/> Here is the call graph for this function:</div>
<div id="dynsection-12-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-12-content" class="dyncontent" style="display:none;">
<div class="center"><iframe scrolling="no" frameborder="0" src="structchi_1_1Result_a8fb4cc68d78f0a0068c0ddd282875eee_cgraph.svg" width="368" height="88"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
</div>

</div>
</div>
<a id="aa3dbb473ec8607456c13be950e739827"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa3dbb473ec8607456c13be950e739827">&#9670;&nbsp;</a></span>operator+=()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structchi_1_1Result.html">Result</a> &amp; operator+= </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structchi_1_1Result.html">Result</a> &amp;&#160;</td>
          <td class="paramname"><em>lhs</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structchi_1_1Result.html">Result</a> &amp;&#160;</td>
          <td class="paramname"><em>rhs</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">related</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Append one result to an existing one. </p>
<p>Both of the contexts are merged. The entires in lhs have the rhs context applied to them, and viceversa as well </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">lhs</td><td>The existing <a class="el" href="structchi_1_1Result.html" title="The result object, used for identifiying errors with good diagnostics. ">Result</a> to add to </td></tr>
    <tr><td class="paramname">rhs</td><td>The (usually temporary) result to be added into lhs. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>*this </dd></dl>

<p class="definition">Definition at line <a class="el" href="Result_8cpp_source.html#l00127">127</a> of file <a class="el" href="Result_8cpp_source.html">Result.cpp</a>.</p>

<p class="reference">References <a class="el" href="Result_8cpp_source.html#l00095">contextJson()</a>, <a class="el" href="Result_8hpp_source.html#l00155">mSuccess</a>, <a class="el" href="Result_8hpp_source.html#l00152">result_json</a>, and <a class="el" href="Result_8hpp_source.html#l00141">success()</a>.</p>
<div id="dynsection-13" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-13-trigger" src="closed.png" alt="+"/> Here is the call graph for this function:</div>
<div id="dynsection-13-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-13-content" class="dyncontent" style="display:none;">
<div class="center"><iframe scrolling="no" frameborder="0" src="structchi_1_1Result_aa3dbb473ec8607456c13be950e739827_cgraph.svg" width="376" height="88"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
</div>

</div>
</div>
<a id="a3a1caa60d79ed3cd997da1559bddd278"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3a1caa60d79ed3cd997da1559bddd278">&#9670;&nbsp;</a></span>operator<<()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::ostream &amp; operator&lt;&lt; </td>
          <td>(</td>
          <td class="paramtype">std::ostream &amp;&#160;</td>
          <td class="paramname"><em>lhs</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structchi_1_1Result.html">Result</a> &amp;&#160;</td>
          <td class="paramname"><em>rhs</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">related</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Stream operator. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">lhs</td><td>The stream </td></tr>
    <tr><td class="paramname">rhs</td><td>The <a class="el" href="structchi_1_1Result.html" title="The result object, used for identifiying errors with good diagnostics. ">Result</a> to print to lhs </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>lhs after printing </dd></dl>

<p class="definition">Definition at line <a class="el" href="Result_8hpp_source.html#l00187">187</a> of file <a class="el" href="Result_8hpp_source.html">Result.hpp</a>.</p>

<p class="reference">References <a class="el" href="Result_8cpp_source.html#l00065">dump()</a>.</p>
<div id="dynsection-14" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-14-trigger" src="closed.png" alt="+"/> Here is the call graph for this function:</div>
<div id="dynsection-14-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-14-content" class="dyncontent" style="display:none;">
<div class="center"><iframe scrolling="no" frameborder="0" src="structchi_1_1Result_a3a1caa60d79ed3cd997da1559bddd278_cgraph.svg" width="338" height="38"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
</div>

</div>
</div>
<hr/>The documentation for this struct was generated from the following files:<ul>
<li>lib/support/include/chi/Support/<a class="el" href="Result_8hpp_source.html">Result.hpp</a></li>
<li>lib/support/src/<a class="el" href="Result_8cpp_source.html">Result.cpp</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="namespacechi.html">chi</a></li><li class="navelem"><a class="el" href="structchi_1_1Result.html">Result</a></li>
    <li class="footer">Generated on Sat Sep 16 2017 17:41:35 for chigraph by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
  </ul>
</div>
</body>
</html>
